const sequelize = require("./db");
const { DataTypes } = require("sequelize");

const Atm = sequelize.define("atm", {
  status: {
    type: DataTypes.STRING,
    defaultValue: "off"
  },
  area_id: {
    type: DataTypes.INTEGER,
  },
  money: {
    type: DataTypes.DECIMAL(10, 0),
  },
  atm_code: {
    type: DataTypes.STRING(10),
  },
  position: {
    type: DataTypes.STRING,
  },
  alarm_threshold: {
    type: DataTypes.DECIMAL(10, 0),
    defaultValue: 100000
  },
}, {
  tableName: "atm",
  createdAt: false,
  updatedAt: false,
  paranoid: false
});

module.exports = Atm;